
#ifndef EXTRAMETHODS_H_
#define EXTRAMETHODS_H_

#include <string>
#include <ext/hash_map>


using std::string;

string stripWhiteSpaces(string str);
void whatToModify(char replacing,string replaceWith,string &toModify);	
	//replace the char with the string "replaceWith" in "toModify"
void whatToModify(string replacing,char replaceWith,string &toModify);	
	//replace the string "replacing" with the char in "toModify"
void changeToDirFromFilelocation(const string filename);

using __gnu_cxx::hash_map;
using __gnu_cxx::hash;

namespace __gnu_cxx //this is needed caus there is a fault with hash_map's
{                   //that contain string's
    using namespace std;
 
    template<>
            struct hash<string>
    {
        size_t operator()(const string& s) const
        {
            const collate<char>& c = use_facet<collate<char> >(locale::classic());
            return c.hash(s.c_str(), s.c_str() + s.size());
        }
    };
};

struct eqstr
{
    bool operator()(string s1,string s2) const
    {
        return s1==s2;
    }
};

#endif // EXTRAMETHODS_H_
